package it.polimi.digitalstate.dto;




import java.sql.Date;

public class ElectionVoteDTO implements IDataTransferObject{
	private Integer id;
	private CitizenDTO citizen, p1, p2, p3;
	private PartyDTO party;
	private Date vote_date;
	private ElectionDTO election;
	
	public ElectionVoteDTO(CitizenDTO citizen, PartyDTO party, CitizenDTO p1, CitizenDTO p2, CitizenDTO p3){
		this.citizen = citizen;
		this.party=party;
		this.p1=p1;
		this.p2=p2;
		this.p3=p3;
	}
	public ElectionVoteDTO(CitizenDTO citizen, PartyDTO party, CitizenDTO p1, CitizenDTO p2, CitizenDTO p3, ElectionDTO election){
		this.citizen = citizen;
		this.party=party;
		this.p1=p1;
		this.p2=p2;
		this.p3=p3;
		this.election=election;
	}
	public ElectionVoteDTO(CitizenDTO citizen, PartyDTO party, CitizenDTO p1, CitizenDTO p2, CitizenDTO p3, Date vote_date, ElectionDTO election){
		this.citizen = citizen;
		this.party=party;
		this.p1=p1;
		this.p2=p2;
		this.p3=p3;
		this.vote_date=vote_date;
		this.election = election;
	}
	public ElectionVoteDTO(int id,CitizenDTO citizen, PartyDTO party, CitizenDTO p1, CitizenDTO p2, CitizenDTO p3, Date vote_date, ElectionDTO election){
		this(citizen, party, p1, p2, p3, vote_date, election);
		this.id=id;
	}
	public CitizenDTO getCitizen() {
		return citizen;
	}
	public void setCitizen(CitizenDTO citizen) {
		this.citizen = citizen;
	}
	public PartyDTO getParty() {
		return party;
	}
	public void setParty(PartyDTO party) {
		this.party = party;
	}
	public CitizenDTO getP1() {
		return p1;
	}
	public void setP1(CitizenDTO p1) {
		this.p1 = p1;
	}
	public CitizenDTO getP2() {
		return p2;
	}
	public void setP2(CitizenDTO p2) {
		this.p2 = p2;
	}
	public CitizenDTO getP3() {
		return p3;
	}
	public void setP3(CitizenDTO p3) {
		this.p3 = citizen;
	}
	
	public ElectionDTO getElection() {
		return election;
	}
	public void setElection(ElectionDTO election) {
		this.election = election;
	}
	public Date getVote_date() {
		return vote_date;
	}
	public void setVote_date(Date vote_date) {
		this.vote_date = vote_date;
	}
	@Override
	public int getID() {
		if(id==null){
			//TODO throw exception
		}
		return id.intValue();
	}
	
}
